Questions
8 of 14
1What is a segment in Qdrant's storage engine, and why does a collection consist of multiple segments rather than one monolithic index?
2What role does the Write-Ahead Log (WAL) play in Qdrant, and what failure scenario does it protect against?
3How does memory-mapped (mmap) storage allow Qdrant to serve a collection larger than available RAM?
4What does the background optimizer do in Qdrant, and why can too-aggressive optimization affect query latency?
5What is the practical difference between storing vectors in-memory versus on-disk in a collection configuration, and when would you choose on-disk?
6What is sharding in a distributed Qdrant cluster, and what determines which shard a given point is written to by default?
7What is custom sharding, and how does it change the way multitenant data is distributed across a cluster?
8What consensus algorithm does Qdrant use to keep cluster metadata consistent across nodes, and what does it coordinate?
9What are Qdrant's tunable read/write consistency levels for distributed operations, and what trade-off do they represent?
10In a replicated cluster, what happens to search results if a query is served while one replica of a shard is temporarily out of sync?
11Walk through what happens internally, at a high level, when a client sends a filtered vector search request to a distributed Qdrant cluster.
12Why does Qdrant merge and re-rank results from multiple shards rather than simply concatenating each shard's top-k?
13How does a payload filter interact with segment selection during query execution - does Qdrant always scan every segment?
14What is the performance implication of running a query that touches every named vector on a point versus one that specifies using?
08 / 14

What consensus algorithm does Qdrant use to keep cluster metadata consistent across nodes, and what does it coordinate?

Raft coordinates cluster metadata, not point data

Qdrant uses Raft to keep cluster metadata consistent across nodes. That metadata includes the collection configuration (vector params, HNSW config, quantization config, optimizer config), the cluster topology (which nodes exist and which are healthy), shard placement (which node hosts which shard and which replica is primary), shard key definitions, and aliases. Raft is a leader-based consensus algorithm: a group of nodes elects a leader, all metadata writes go through the leader, the leader replicates the entry to followers, and once a quorum has acknowledged it the entry is committed and applied to the state machine. This gives a strongly consistent, linearizable view of the cluster's configuration even in the presence of node failures, as long as a quorum is available.

The critical distinction is what Raft does not coordinate: point data. Your vectors are not replicated through Raft. Point data replication is a separate mechanism in which each shard has a primary that accepts writes, appends them to its WAL, and streams WAL entries to its replicas. Replicas apply the same operations in the same order, which is a primary-backup log-shipping scheme, not consensus. The reason for the split is cost: Raft requires a quorum round trip for every write, which would be far too slow for high-throughput vector ingest. Metadata changes are rare, so paying the Raft cost for them is acceptable; point writes are frequent, so they use a cheaper replication mechanism with configurable consistency levels. Understanding this split is what lets you reason about failure modes: losing the Raft leader triggers an election and a brief window where metadata changes cannot be committed, but existing point data and queries continue to work. Losing a shard's primary triggers a failover to a replica, which is a data-plane event, not a Raft event.

  1. 1

    Raft coordinates: collection config, cluster topology, shard placement, shard key definitions, aliases.

  2. 2

    Raft does not coordinate: point data. Point replication uses WAL streaming from primary to replicas.

  3. 3

    Consistency: Raft gives linearizable metadata as long as a quorum is available.

  4. 4

    Failure handling: leader loss triggers an election; quorum loss blocks metadata changes but does not necessarily block reads or existing writes.

  5. 5

    Cost model: Raft round trips are acceptable for rare metadata changes, not for high-frequency point writes.

The trade-off is strong consistency for metadata against the availability cost of requiring a quorum. If a cluster loses quorum - for example, two of three Raft nodes are down - it cannot commit metadata changes, which means you cannot create collections, change configs, or rebalance shards until quorum is restored. Reads and existing point writes can often continue under the consistency settings you have chosen, but any operation that requires a metadata change will block. The common mistake is assuming Raft replicates your vectors. It does not - if you want point data to survive a node loss, you need replication_factor greater than one, which is a separate setting. The second mistake is assuming the cluster becomes unavailable when the Raft leader fails. It does not; a new leader is elected, and the unavailability window is only as long as the election takes. The third mistake is conflating Raft consistency with read consistency. The consistency levels you set on reads (one, majority, all) govern point data freshness, not metadata consistency. Version note: Qdrant's use of Raft has evolved - in older versions there was a single consensus group for the whole cluster, while newer versions have moved toward per-collection consensus and richer topology management. The exact behavior of metadata operations during partial failures differs between versions.

javascript

Version-dependent: Qdrant's consensus implementation has changed across releases. Early versions used a single Raft group for the entire cluster; more recent versions have moved toward per-collection consensus and more sophisticated placement and rebalancing. The exact metadata that goes through consensus, the behavior during quorum loss, and the API for inspecting consensus state all differ. If you are designing for high availability, verify the failure behavior on your version rather than relying on a general description of Raft, and test the specific scenarios (leader loss, quorum loss, node replacement) that matter for your SLA.

Difficulty: 8/10
Topics: Raft, Consensus, Distributed Architecture

Scenario Questions

0-2 years experience
  1. 1

    A teammate says Qdrant uses Raft to replicate vectors. Correct them and explain what Raft actually replicates.

  2. 2

    The Raft leader goes down. Explain what happens to running queries and to a new collection creation request.

2-5 years experience
  1. 1

    Your 3-node cluster loses 2 nodes and you can no longer create collections. Explain why, and whether existing queries still work.

  2. 2

    You add a new node to a running cluster and it does not receive any shards. Explain how shard placement is decided and what you would check.

5-8 years experience
  1. 1

    Design a Qdrant cluster that survives the loss of any single node without metadata unavailability and without point data loss. Specify node count, replication, consistency, and placement.

  2. 2

    You need to perform a rolling upgrade across a 6-node cluster with zero downtime. Describe how Raft and the WAL interact during the upgrade and what could go wrong.

8+ years experience
  1. 1

    You are designing a multi-datacenter Qdrant deployment. Explain how Raft's quorum requirements constrain your topology and what alternatives you would consider for cross-region metadata consistency.

  2. 2

    Derive the availability characteristics of a Qdrant cluster as a function of node count, replication factor, and Raft quorum size, and identify the configuration that maximizes availability for a given cost.

Follow-up Questions

  • What operations become unavailable when a Qdrant cluster loses Raft quorum, and how would you design a deployment to minimize the blast radius of a quorum loss?
  • How would you distinguish a metadata-plane failure from a data-plane failure when debugging a cluster incident, using only the client API and logs?